BaseMaster.cs
Code Type: C# Class
Uses Classes: CData, CSec, CDataConnection, CMDWSOps, CStatus, AppMaster, CDataParameterList, List<ActivePage>
Uses PL/SQL Procedures: PCK_FX_SEC.SetSessionValue, PCK_FX_SEC.GetSessionValue, PCK_FX_SEC.DeleteSessionValue, PCK_FX_SEC.DeleteAllSessionValues

Lines of Code: 616

public string DUZ

	set when we are accessed from the thin client or duz and dfn are passed on the query string 

public bool Theme508

	508 theme property 

public string SelectedCPAID

	selected CPA ID 

public string SelectedCPAText

	selected CPA text 

public string DFN

	set when we are accessed from the thin client or duz and dfn are passed on the query string 

public string SRV

	CPRS SRV param set when we are accessed from the query string 

public string PORT

	CPRS PORT param set when we are accessed from the query string 

public long EventStatus

	event status 

public long RegionID

	region id 

public long SiteID

	site id 

public void LookupPatientByDUZ(string strDUZ, string strDFN)

	 patient lookup by duz 

public void GotoHomePage()

	 redirects to our home page 

public void GotoPatientSummaryPage()

	redirects to our patient summary page 

public void GotoPatientDemographicsPage()

	redirects to patient demographics page 

public void EXTGotoHomePage()

	 redirects to our home page 

public void EXTGotoPatientSummaryPage()

	redirects to our patient summary page 

public void EXTGotoPatientDemographicsPage()

	redirects to patient demographics page 

public void GotoLoginPage()

	redirects to start page 

public void EXTGotoLoginPage()

	redirects to start page 

public bool MDWSTransfer

	MDWS SUPPORT: is support for MDWS turned on? 

public string MDWSEmrSvcContext

	MDWS context 

public CData GetDataObject()

	loads and returns a CData instance from properties of BaseMaster 

public string StatusComment

	get/set status comment info, it will append... this allows us to keep a running list of errors if needed 

public void ClearStatus()

	clear the status, called by the masterpage after we display status info 

public long StatusCode

	get/set status code info 

public void ShowSystemFeedback(string strMessage, string strTitle)
       
	 Show system feedbacks in an Ext.NET Window control 

public long FXUserID

	get/set user id 

public string ClientIP

	get client ip, may be router but better than nothing 

public BaseMaster()

	constructor 

public void PingMDWS()

	ping MDWS to keep it alive 

protected void Page_Init(object sender, EventArgs e)

	this is the proper place to do initialization in a master page 

public bool SetSessionValue( string strKey,
                                 string strKeyValue)

	caches a session value in the database. stored encrypted and more secure then an asp.net session var 

public bool GetSessionValue(string strKey,
                                out string strKeyValue)

	gets a cached session value from the database. stored encrypted and more secure then an asp.net session var 

public bool DeleteSessionValue(string strKey)

	deletes a cached session value in the database. 

public bool DeleteAllSessionValues()

	deletes all cached session values in the database. 

public string GetPageName()

	helper to get the current page name 

public override void Dispose()

	good place to close connections etc... 

private bool ConnectToDataSource()

	connect to datasource 

private void ValidateRequest()

	Every request is validate for authentication. Validate the request if it's not a "Post Back" to check if we need to prompt for credentials.  After logging in the user can open more TABs without the need of reentering the credentials. But if the user closes all TABs or Logoff or the connection is not active (idle for more that the time permitted) the user most enter the credentials. 

private void RegisterPageRequest()

	This method add the page name from the current request to the session list of current pages (session variable FX_CRRPGS) 

[Ext.Net.DirectMethod(IDMode = Ext.Net.DirectMethodProxyIDMode.None, ShowMask = true, Msg = "<span role='alert'>Please wait.</span>")]
    public void UnregisterPageRequest()

	Direct method to remove the page name from the lit of current pages (session variable FX_CRRPGS) This method is call from the MasterPage while navigating away from it (windows.onbeforeunload) 

private string GetRequestPageName()

	Returns the name of the page in the current request 

private void CheckRequestSource()

	Check if the source of the request (Request.UrlReferrer) comes from inside the app. Gets information about the URL of the client's previous request that linked to the current URL. If this information is not available then the client could be trying to navigate to the app after closing the browser's tab (only scenario where SessionID still alive and the client could auto login (if the session hasn't expired) if we don't validate this). Another scenario could be that the client type the URL in the browser within the app. They will be logoff, if they do.  This works on: IE7 7.0.6002.18005 Cipher Strength 256-bit (latest security update) IE8 8.0.6001.18928 Cipher Strength 256-bit (latest security update) IE  9, 10, ... Google Chrome 41.0.2272.118 m 

private void LogOffCPRS()

	LogOff current user and redirect to login page as it will do a normal CPRS link. 

public void KillSession()

	clears variables and kills the session 

public void LogOff()

	 called to logoff the user 

public void EXTLogOff()

	logoff called from EXT directmethods 

public void LoginViaCPRS()

	setup logon from CPRS 

public void LogOff(bool bRedirect)

	logoff 

private class ActivePage

	active page 

	

